home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH5 / 5-3-6.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-18  |  2.6 KB  |  90 lines

  1. VERSION 5.00
  2. Begin VB.Form frmWeather 
  3.    Caption         =   "Weather Beacon"
  4.    ClientHeight    =   2265
  5.    ClientLeft      =   2160
  6.    ClientTop       =   1785
  7.    ClientWidth     =   2685
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    PaletteMode     =   1  'UseZOrder
  19.    ScaleHeight     =   2265
  20.    ScaleWidth      =   2685
  21.    Begin VB.PictureBox picForecast 
  22.       Height          =   375
  23.       Left            =   600
  24.       ScaleHeight     =   315
  25.       ScaleWidth      =   1275
  26.       TabIndex        =   5
  27.       Top             =   1680
  28.       Width           =   1335
  29.    End
  30.    Begin VB.CommandButton cmdInterpret 
  31.       Caption         =   "Interpret Beacon"
  32.       Height          =   495
  33.       Left            =   240
  34.       TabIndex        =   4
  35.       Top             =   960
  36.       Width           =   2055
  37.    End
  38.    Begin VB.TextBox txtMode 
  39.       Height          =   285
  40.       Left            =   1680
  41.       TabIndex        =   3
  42.       Top             =   480
  43.       Width           =   615
  44.    End
  45.    Begin VB.TextBox txtColor 
  46.       Height          =   285
  47.       Left            =   1680
  48.       TabIndex        =   1
  49.       Top             =   120
  50.       Width           =   615
  51.    End
  52.    Begin VB.Label lblMode 
  53.       Caption         =   "Mode (S or F)"
  54.       Height          =   255
  55.       Left            =   360
  56.       TabIndex        =   2
  57.       Top             =   480
  58.       Width           =   1215
  59.    End
  60.    Begin VB.Label lblColor 
  61.       Caption         =   "Color of the light"
  62.       Height          =   255
  63.       Left            =   120
  64.       TabIndex        =   0
  65.       Top             =   120
  66.       Width           =   1455
  67.    End
  68. Attribute VB_Name = "frmWeather"
  69. Attribute VB_GlobalNameSpace = False
  70. Attribute VB_Creatable = False
  71. Attribute VB_PredeclaredId = True
  72. Attribute VB_Exposed = False
  73. Private Sub cmdInterpret_Click()
  74.   Dim color As String, mode As String
  75.   'Interpret a weather beacon
  76.   picForecast.Cls
  77.   color = txtColor.Text
  78.   mode = txtMode.Text
  79.   Select Case UCase(mode) & UCase(color)
  80.     Case "SBLUE"
  81.       picForecast.Print "CLEAR VIEW"
  82.     Case "FBLUE"
  83.       picForecast.Print "CLOUDS DUE"
  84.     Case "SRED"
  85.       picForecast.Print "RAIN AHEAD"
  86.     Case "FRED"
  87.       picForecast.Print "SNOW AHEAD"
  88.   End Select
  89. End Sub
  90.